import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '更新时间',
    align: "center",
    dataIndex: 'createTime'
  },
  {
    title: '状态',
    align: "center",
    dataIndex: 'status_dictText'
  },
  {
    title: '司机',
    align: "center",
    dataIndex: 'driverUserId_dictText'
  },
  {
    title: '车牌号',
    align: "center",
    dataIndex: 'driverVehicleNo'
  },
  {
    title: '司机电话',
    align: "center",
    dataIndex: 'driverPhone'
  },
  {
    title: '司机姓名',
    align: "center",
    dataIndex: 'driverName'
  },
  {
    title: '司机银行卡',
    align: "center",
    dataIndex: 'driverBankId'
  },
  {
    title: '银行卡开户名',
    align: "center",
    dataIndex: 'driverBankHolder'
  },
  {
    title: '银行卡号',
    align: "center",
    dataIndex: 'driverBankCardNo'
  },
  {
    title: '开户行',
    align: "center",
    dataIndex: 'driverBankName'
  },

];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "公司",
    field: 'companyId',
    component: 'JSearchSelect',
    componentProps:{
      dict: "wlhy_company where version = '9999-09-09 00:00:00' and status = 1,company_name,id"
    },
    //colProps: {span: 6},
  },
  {
    label: "司机",
    field: 'driverUserId',
    component: 'JSearchSelect',
    componentProps:{
      dict: "sys_user,realname,id"
    },
    //colProps: {span: 6},
  },
  {
    label: "车牌号",
    field: 'driverVehicleNo',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "司机电话",
    field: 'driverPhone',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "司机姓名",
    field: 'driverName',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "司机银行卡",
    field: 'driverBankId',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "银行卡开户名",
    field: 'driverBankHolder',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "银行卡号",
    field: 'driverBankCardNo',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "开户行",
    field: 'driverBankName',
    component: 'Input',
    //colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '公司',
    field: 'companyId',
    component: 'JSearchSelect',
    componentProps:{
      dict: "wlhy_company where version = '9999-09-09 00:00:00' and status = 1,company_name,id"
    },
  },
  {
    label: '司机',
    field: 'driverUserId',
    component: 'JSearchSelect',
    componentProps:{
      dict: "sys_user,realname,id"
    },
  },
  {
    label: '车牌号',
    field: 'driverVehicleNo',
    component: 'Input',
  },
  {
    label: '司机电话',
    field: 'driverPhone',
    component: 'Input',
  },
  {
    label: '司机姓名',
    field: 'driverName',
    component: 'Input',
  },
  {
    label: '司机银行卡',
    field: 'driverBankId',
    component: 'Input',
  },
  {
    label: '银行卡开户名',
    field: 'driverBankHolder',
    component: 'Input',
  },
  {
    label: '银行卡号',
    field: 'driverBankCardNo',
    component: 'Input',
  },
  {
    label: '开户行',
    field: 'driverBankName',
    component: 'Input',
  },
  {
    label: '状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "row_status"
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// 高级查询数据
export const superQuerySchema = {
  companyId: {title: '公司',order: 0,view: 'sel_search', type: 'string',dictTable: "wlhy_company where version = '9999-09-09 00:00:00' and status = 1", dictCode: 'id', dictText: 'company_name',},
  driverUserId: {title: '司机',order: 1,view: 'sel_search', type: 'string',dictTable: "sys_user", dictCode: 'id', dictText: 'realname',},
  driverVehicleNo: {title: '车牌号',order: 2,view: 'text', type: 'string',},
  driverPhone: {title: '司机电话',order: 3,view: 'text', type: 'string',},
  driverName: {title: '司机姓名',order: 4,view: 'text', type: 'string',},
  driverBankId: {title: '司机银行卡',order: 5,view: 'text', type: 'string',},
  driverBankHolder: {title: '银行卡开户名',order: 6,view: 'text', type: 'string',},
  driverBankCardNo: {title: '银行卡号',order: 7,view: 'text', type: 'string',},
  driverBankName: {title: '开户行',order: 8,view: 'text', type: 'string',},
  status: {title: '状态',order: 9,view: 'list', type: 'string',dictCode: 'row_status',},
};
